<div class="main_container">
	<div class="main_label_header_container">
		<h2><?php echo $page_label; ?></h2>
	</div>
	<br/>
	<div class="form-wrapper">
		<?php if (validation_errors()): ?>
		<div class="error-box">
			<?php echo validation_errors('<div>','</div>');?>
		</div>
		<?php endif; ?>
		
		<?php echo form_open(site_url('student/create')); ?>
		<div class="category-container">
			<h2>Primary Information</h2>
		</div>
		<label for="student_number"><?php echo lang('student_label_id'); ?></label>
		<input type="text" maxlength="10" autocomplete="off" class="ipt-txt half-width ipt-edit" name="number" value="<?php echo $profile->id ?>" disabled="disabled" />
		<br/>
		<label for="student_mname"><?php echo lang('student_label_lastname'); ?></label>
		<input type="text" maxlength="30" autocomplete="off" class="ipt-txt full-width ipt-edit" name="lastname" value="<?php echo $profile->lastname; ?>" disabled="disabled" />
		<br/>
		<label for="student_mname"><?php echo lang('student_label_middlename'); ?></label>
		<input type="text" maxlength="30" autocomplete="off" class="ipt-txt full-width ipt-edit" name="middlename" value="<?php echo $profile->middlename; ?>" disabled="disabled" />
		<br/>
		<label for="student_fname"><?php echo lang('student_label_firstname'); ?></label>
		<input type="text" maxlength="30" autocomplete="off" class="ipt-txt full-width ipt-edit" name="firstname" value="<?php echo $profile->firstname; ?>" disabled="disabled" />
		<br/>
		<div class="category-container">
			<h2>Contact Information</h2>
		</div>
		<label for="student_phone"><?php echo lang('student_label_phone'); ?></label>
		<input type="text" maxlength="30" autocomplete="off" class="ipt-txt full-width ipt-edit" name="phone" value="<?php echo $profile->phone; ?>" />
		<br/>
		<label for="student_mobile"><?php echo lang('student_label_mobile'); ?></label>
		<input type="text" maxlength="30" autocomplete="off" class="ipt-txt full-width ipt-edit" name="mobile" value="<?php echo $profile->mobile; ?>" />
		<br/>
		<label for="student_email"><?php echo lang('student_label_email'); ?></label>
		<input type="text" maxlength="30" autocomplete="off" class="ipt-txt full-width ipt-edit" name="email" value="<?php echo $profile->email; ?>" />
		<br/>
		<ul class="tabs">
		<li><a href="#tab1">Basic</a></li>
		<li><a href="#tab2">Address</a></li>
		<li><a href="#tab3">Academic</a></li>
		<li><a href="#tab4">Financial</a></li>
		<li><a href="#tab5">Access</a></li>
		</ul>
		<div class="tab_container">
			<div id="tab1" class="tab_content">
				<label for="student_nationality"><?php echo lang('student_label_nationality'); ?></label></td>
				<input type="text" size="20" maxlength="30" autocomplete="off" class="ipt-txt full-width ipt-edit" name="nationality" value="<?php echo $profile->nationality; ?>" />
				<br/>
				<label for="student_nationality"><?php echo lang('student_label_religion'); ?></label></td>
				<input type="text" size="20" maxlength="30" autocomplete="off" class="ipt-txt full-width ipt-edit" name="nationality" value="<?php echo $profile->religion; ?>" />
				<br/>
				<?php
					$options = array(
										''  		=> '----- Select Gender -----',
										'male'  	=> 'Male',
										'female' 	=> 'Female'
									);
				?>
				<label for="student_gender"><?php echo lang('student_label_gender'); ?></label></td>
				<?php echo form_dropdown('gender', $options); ?>
				<br/>
				<?php
					$options = array(
										''  		=> '----- Select Status -----',
										'single'  	=> 'Single',
										'married'  	=> 'Married',
										'widowed'	=> 'Widowed'
									);
				?>
				<label for="student_nationality"><?php echo lang('student_label_marital_status'); ?></label></td>
				<?php echo form_dropdown('marital_status', $options); ?>
			</div>
			<div id="tab2" class="tab_content">
				<table class="table-grid">
					<thead>
						<tr>
							<th><?php echo lang('student_label_address_1'); ?></th>
							<th><?php echo lang('student_label_address_2'); ?></th>
							<th><?php echo lang('student_label_address_city'); ?></th>
							<th><?php echo lang('student_label_address_province'); ?></th>
							<th><?php echo lang('student_label_address_zip'); ?></th>
							<th><?php echo lang('student_label_address_country'); ?></th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td><input type="text" autocomplete="off" name="address1" class="ipt-txt full-width ipt-edit" value="<?php echo set_value('address1');?>" size="21" /></td>
							<td><input type="text" autocomplete="off" name="address2" class="ipt-txt full-width ipt-edit" value="<?php echo set_value('address2');?>" size="21" /></td>
							<td><input type="text" autocomplete="off" name="city" class="ipt-txt full-width ipt-edit" value="<?php echo set_value('city');?>" size="21" /></td>
							<td><input type="text" autocomplete="off" name="province" class="ipt-txt full-width ipt-edit" value="<?php echo set_value('province');?>" size="21" /></td>
							<td><input type="text" autocomplete="off" name="zip" class="ipt-txt full-width ipt-edit" value="<?php echo set_value('zip');?>" size="21" /></td>
							<td><input type="text" autocomplete="off" name="country" class="ipt-txt full-width ipt-edit" value="<?php echo set_value('country');?>" size="21" /></td>
						</tr>
				</table>
			</div>
			<div id="tab3" class="tab_content">
				<?php echo 'Academic'; ?>
			</div>
			<div id="tab4" class="tab_content">
				<div class="usual">
					<ul class="idTabs">
					  <li><a href="#idTab1">Account Balance</a></li>
					  <li><a href="#idTab2">Transaction History</a></li>
					</ul>
					<div id="idTab1">Remaining Balance (PHP: 19,000.00</div>
					<div id="idTab2">
						<table class="table-grid">
							<thead>
								<tr>
									<th><?php echo lang('student_label_financial_view'); ?></th>
									<th><?php echo lang('student_label_financial_number'); ?></th>
									<th><?php echo lang('student_label_financial_date'); ?></th>
								</tr>
							</thead>
							<tbody>
							<?php if ($invoices): ?>
							<?php foreach($invoices as $row): ?>
								<tr>
									<td><?php echo anchor('transaction/view_invoice/'.$row->id, 'View'); ?></td>
									<td><?php echo $row->invoice_number; ?></td>
									<td><?php echo date('d M Y', $row->date_created); ?></td>
								</tr>
							<?php endforeach; ?>
							<?php endif; ?>
							</tbody>
						</table>
					</div>
				</div>
			</div>
			<div id="tab5" class="tab_content">
				<?php echo 'Access'; ?>
			</div>
		</div>
		<fieldset id="action">
		<a href="#" class="btn btn-save"><span class="btn-icon disk-icon"></span><?php echo lang('student_button_save'); ?></a>
		<a href="<?php echo site_url('student/student'); ?>" class="btn btn-cancel"><span class="btn-icon cancel-icon"></span><?php echo lang('student_button_cancel'); ?></a>
		</fieldset>
		<?php echo form_close(); ?>
	</div>
</div>
<script type="text/javascript">
	$('.btn-save').click(function() {
		$('form').submit();
		return false;
	});
</script>
	<!--<table class="table-grid" id="item-grid">
		<thead>
			<tr>
				<th><?php //echo lang('student_item'); ?></th>
				<th><?php //echo lang('student_item_amount'); ?></th>
				<th class="action-width"></th>
			</tr>
        </thead>
		<tbody>
			
		</tbody>
		<tfoot>
			<tr>
				<td colspan="2"></td>
				<td class="align-center" ><a href="#" class="btn btn-add"><span class="btn-icon plus-icon"></span><?php echo lang('student_button_add_item'); ?></a></td>
			</tr>
		</tfoot>
	</table>
	<fieldset id="action">
		<a href="#" class="btn btn-save"><span class="btn-icon disk-icon"></span>
		<?php //echo lang('student_button_save'); ?></a>
		<a href="<?php //echo site_url('student/student'); ?>" class="btn btn-cancel"><span class="btn-icon cancel-icon"></span>
				<?php //echo lang('student_button_cancel'); ?></a>
	</fieldset>
    <?php //echo form_close(); ?>
</div>
<script>
	var item = '';
	var counter = 0;
	<?php //foreach ($item as $i ) : ?>
		item += "<option value='<?php //echo $i->id; ?>'>
		<?php //echo $i->name; ?></option>";                   
	<?php //endforeach; ?>
	
	$('.btn-save').click(function(){
	$('form').submit();
	return false;
	});
	
	
	$('.btn-add').click(function(){
	   
	   $('#item-grid tbody').append(
			$('<tr>').attr('id','tr_'+(++counter)).append(
				$('<td>').append(
					$('<select>').addClass('max-width item-select').attr('name','student_items[]').append(
						item
					)
				),
				$('<td>').append(
					$('<input type="text">').attr('name','item_amount[]')
				),
				$('<td>').append(
					$('<a>').addClass('btn btn-delete').append(
						$('<span>').addClass('btn-icon delete-icon'),
						'Remove'
					).attr({'title':'Remove','href':'#','rel':'tr_'+counter}).bind('click',function(){
						$('#'+$(this).attr('rel')).remove();
					})
				)
			)
	   );
		return false;
	});
        
</script>-->